package com.fofia.iotweb.web.dbdomain.services.iot;

import com.fofia.iotweb.web.dbdomain.mappers.iot.IotTagsMapper;
import com.fofia.iotweb.web.dbdomain.models.iot.IotTags;
import com.mybatisflex.core.query.QueryWrapper;
import org.noear.solon.annotation.Inject;

import java.util.List;

public class IotTagsService {

    @Inject
    private IotTagsMapper tagsMapper;


    public List<String> GetTags(){
        int clientId=45;
        String createTime="2023-11-28 15:01:25";
        //return tagsMapper.selectListByQuery(clientId);
        QueryWrapper queryWrapper=QueryWrapper.create()
                .select(IotTags::getTagId)
                .where(IotTags::getClientId).eq(clientId)
                .where(IotTags::getCreateTime).ge(createTime);
        return tagsMapper.selectListByQueryAs(queryWrapper,String.class);

    }

}
